/**
 * Created by liuqingxia on 2016/7/4.
 */

function gcacheInsertFunctions() {
	changeRedisCmdSelect();
}

function changeRedisCmdSelect() {
	$(document).on("change", "select[name='writerDataStructure']", function() {

		var redisCmd = $.trim($(this).val());
		var writerVdataStructureDiv = $("#writerVdataStructureDiv");
		var writerOextendFieldDiv = $("#writerOextendFieldDiv");

		if ("LPUSH" == redisCmd) {
			writerVdataStructureDiv.show();
		} else {
			writerVdataStructureDiv.hide();
		}

		if ("APPEND" != redisCmd && "SADD" != redisCmd && "ZADD" != redisCmd) {
			writerOextendFieldDiv.show();
		} else {
			writerOextendFieldDiv.hide();
		}

	});
}